<?php

abstract class BasePage {
    const DefaultTimeZone = 'PST';

    function __construct() {
        echo "<!--" . __CLASS__ . " constructed-->";

        // set default timezone for all derived pages
        date_default_timezone_set(self::DefaultTimeZone);   
    }

    function __destruct() {
        echo "<!--" . __CLASS__ . " destructed-->";  
    }

    protected abstract function PrintHeader();
    protected abstract function PrintFooter();

    protected final function PrintCommonHeader() {
        echo "<table border='1' width='100%'><tr><td style='background-color:green;color:white'><h1>CSS 600 - PHP Common Header</h1></td></tr></table>";
    }
}

?>